#!/bin/bash
# a program for scan file which inputed by user and print information

# get a file path from user input
read -p 'Please input a path:' file_path
test -e $file_path && echo 'The path exists' || echo 'The path not exists'
test -f $file_path && echo 'The path is file'
test -d $file_path && echo 'The path is directory'
test -r $file_path && echo 'The path is readable'
test -w $file_path && echo 'The path is writeable'
test -x $file_path && echo 'The path is excuteable'
exit 0
